package com.example.awale;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {
	private Button OnePlayer;
	private Button TwoPlayer;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        
        OnePlayer=(Button)findViewById(R.id.btnOnePlayer);
        TwoPlayer=(Button)findViewById(R.id.btnTwoPlayer);
        
        OnePlayer.setOnClickListener(button); 
        TwoPlayer.setOnClickListener(button); 
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main, menu);
        return true;
    }
    
    private Button.OnClickListener button = new Button.OnClickListener() {
    	@Override
		public void onClick(View v) {
			switch (v.getId()){			
				case R.id.btnOnePlayer:
			        Intent myIntent = new Intent(getApplicationContext(),AwaleIA.class);
					startActivity(myIntent);
					break;				
			}
		}	
	};
    
}
